<script src="../../resources/js-test.js"></script>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>
<style>
.a { margin-left:5px; }
.b { margin-left:inherit; }
.c { margin-left:10px; }
</style>
<div class=a>
    <div class="" id=test1a></div>
</div>
<div>
    <div class=a>
        <div class="" id=test1b></div>
    </div>
</div>
<div class=a>
    <div class="b" id=test2a></div>
</div>
<div>
    <div class=a>
        <div class="b" id=test2b></div>
    </div>
</div>
<div class=a>
    <div class="b c" id=test3a></div>
</div>
<div>
    <div class=a>
        <div class="b c" id=test3b></div>
    </div>
</div>
<p>
Test that the matched declaration cache handles explicitly inherited properties correctly.
<p>
<script>
function test(e, p) {
    var testDiv = document.getElementById(e);
    return getComputedStyle(testDiv).marginLeft;
}
shouldBeEqualToString("test('test1a')", "0px");
shouldBeEqualToString("test('test1b')", "0px");
shouldBeEqualToString("test('test2a')", "5px");
shouldBeEqualToString("test('test2b')", "5px");
shouldBeEqualToString("test('test3a')", "10px");
shouldBeEqualToString("test('test3b')", "10px");
</script>
